import hashlib
import requests
from jiekoytest.jiekouzidonghua.requests.tools.md5_jiami import code_md5

"""
    登录接口登录验证
"""
headers={"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"}
url=r"http://localhost:90/login/verifyLogin"
params_name =("username","password")
params_value={"username":"inmaps","password":f"{code_md5(str(123456))}"}
response = requests.get(url=url,params=params_value)
response.encoding="utf-8"
print(response.url)
print(response.json())#如果响应结果不是json则会报错
print(response.cookies.values())
#

"""
    requests的get请求响应结果的查看
"""
# headers={"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"}
# response = requests.get(url=url)
# url=r"http://localhost:90"
# print(response.status_code)
# encod = response.encoding
# print(encod)
# print(response.text)#获取响应内容